package com.zhangmengyuan.medical.service.impl;

import com.zhangmengyuan.medical.dao.OrderDao;
import com.zhangmengyuan.medical.entity.Order;
import com.zhangmengyuan.medical.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderDao orderDao;

    @Override
    public void save(Order order) {
        orderDao.save(order);
    }

    @Override
    public List<Order> getAll() {
        return orderDao.findAll();
    }

    @Override
    public Order getById(Integer orderId) {
        return orderDao.findOne(orderId);
    }
}
